package com.atguigu.lease.common.context;

/**
 * @ClassName LoginUserThredLocal
 * @Author heartFade
 * @Date 2025-05-04 16:34
 * @Version 1.0
 * @Description TODO
 **/
public class LoginUserThreadLocal {
    public static final ThreadLocal<LoginUserContext> loginUserContextThreadLocal = new ThreadLocal<>();

    public static void setLoginUserContext(LoginUserContext loginUserContext) {
        loginUserContextThreadLocal.set(loginUserContext);
    }

    public static LoginUserContext getLoginUserContext() {
        return loginUserContextThreadLocal.get();
    }

    public static void removeLoginUserContext() {
        loginUserContextThreadLocal.remove();
    }
}
